package org.pine.security01;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;

/**
 * @ClassName RegService
 * @Description 注册服务
 * @Author liucs
 * @Date 2021-02-18
 * @Version V1.0
 */
@Service
public class RegService {
    public int reg(String username,String password){
        BCryptPasswordEncoder encoder=new BCryptPasswordEncoder(10);
        String encodePassword=encoder.encode(password);
        return saveToDb(username,encodePassword);
    }

    private int saveToDb(String username, String encodePassword) {
        return 0;
    }
}
